﻿@model Mvc4WebApiKoTb.Models.HomeModels.EditListItemsModel

@{
    ViewBag.Title = "EditListItems";
}

<div class="span12">
    <h2>EditListItems</h2>
    <hr />
    <div class="well">Kurzer Beschreibungstext für das aktuelle Formular</div>
</div>

<div class="span12">
    @using (Html.BeginForm("EditListItems", "Home", FormMethod.Post, new { @class = "form-horizontal" }))
    {
        <table class="table table-hover">
            <tbody>
                @for (int i = 0; i < Model.PersonenListe.Count; i++)
                {
                    if (i > 0)
                    {
                        <tr>
                            <td colspan="4">&nbsp;</td>
                        </tr>
                    }
                    <tr>
                        <td>
                            @Html.LabelFor(p => p.PersonenListe[i].Loginname)
                        </td>
                        <td>
                            @Html.EditorFor(p => p.PersonenListe[i].Loginname)
                        </td>
                    </tr>
                    <tr>
                        <td>
                            @Html.LabelFor(p => p.PersonenListe[i].Vorname)
                        </td>
                        <td>
                            @Html.EditorFor(p => p.PersonenListe[i].Vorname)
                        </td>
                    </tr>
                    <tr>
                        <td>
                            @Html.LabelFor(p => p.PersonenListe[i].Name)
                        </td>
                        <td>
                            @Html.EditorFor(p => p.PersonenListe[i].Name)
                        </td>
                    </tr>
                    <tr>
                        <td>
                            @Html.LabelFor(p => p.PersonenListe[i].Age)
                        </td>
                        <td>
                            @Html.EditorFor(p => p.PersonenListe[i].Age)
                        </td>
                    </tr>
                    <tr>
                        <td>
                            @Html.LabelFor(p => p.PersonenListe[i].Birthdate)
                        </td>
                        <td>
                            @Html.EditorFor(p => p.PersonenListe[i].Birthdate)
                        </td>
                    </tr>
                        <tr>
                        <td>
                            @Html.LabelFor(p => p.PersonenListe[i].IsMale)
                        </td>
                        <td>
                            @Html.EditorFor(p => p.PersonenListe[i].IsMale)
                        </td>
                    </tr>
                }
            </tbody>
            <tfoot>
                <tr>
                    <td colspan="2">
                        <button type="submit" class="btn btn-block" value="Speichern" name="Speichern">Speichern</button>
                    </td>
                </tr>
            </tfoot>
        </table>
    }


</div>

<div class="span12">
    <div class="well">
        @Html.ActionLink("Zurück zur Startseite", "Index", "Home", null, new { @class = "btn btn-mini" })
    </div>
</div>
